home *** CD-ROM | disk | FTP | other *** search
- /*
- File: OCEMessaging.h
-
- Contains: Apple Open Collaboration Environment Messaging Interfaces.
-
- Version: Technology: AOCE Toolbox 1.02
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __OCEMESSAGING__
- #define __OCEMESSAGING__
-
- #ifndef __FILES__
- #include <Files.h>
- #endif
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #ifndef __DIGITALSIGNATURE__
- #include <DigitalSignature.h>
- #endif
- #ifndef __OCE__
- #include <OCE.h>
- #endif
- #ifndef __OCEAUTHDIR__
- #include <OCEAuthDir.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- #if FOR_SYSTEM7_ONLY
- /******************************************************************************/
- /*
- Definitions common to OCEMessaging and to OCEMail. These relate to addressing,
- message ids and priorities, etc.
- */
- /* Values of IPMPriority */
-
- enum {
- kIPMAnyPriority = 0, /* FOR FILTER ONLY */
- kIPMNormalPriority = 1,
- kIPMLowPriority = 2,
- kIPMHighPriority = 3
- };
-
- typedef Byte IPMPriority;
- /* Values of IPMAccessMode */
-
- enum {
- kIPMAtMark = 0,
- kIPMFromStart = 1,
- kIPMFromLEOM = 2,
- kIPMFromMark = 3
- };
-
- typedef unsigned short IPMAccessMode;
-
- enum {
- kIPMUpdateMsgBit = 4,
- kIPMNewMsgBit = 5,
- kIPMDeleteMsgBit = 6
- };
-
- /* Values of IPMNotificationType */
-
- enum {
- kIPMUpdateMsgMask = 1 << kIPMUpdateMsgBit,
- kIPMNewMsgMask = 1 << kIPMNewMsgBit,
- kIPMDeleteMsgMask = 1 << kIPMDeleteMsgBit
- };
-
- typedef Byte IPMNotificationType;
- /* Values of IPMSenderTag */
-
- enum {
- kIPMSenderRStringTag = 0,
- kIPMSenderRecordIDTag = 1
- };
-
- typedef unsigned short IPMSenderTag;
-
- enum {
- kIPMFromDistListBit = 0,
- kIPMDummyRecBit = 1,
- kIPMFeedbackRecBit = 2, /* should be redirected to feedback queue */
- kIPMReporterRecBit = 3, /* should be redirected to reporter original queue */
- kIPMBCCRecBit = 4 /* this recipient is blind to all recipients of message */
- };
-
- /* Values of OCERecipientOffsetFlags */
-
- enum {
- kIPMFromDistListMask = 1 << kIPMFromDistListBit,
- kIPMDummyRecMask = 1 << kIPMDummyRecBit,
- kIPMFeedbackRecMask = 1 << kIPMFeedbackRecBit,
- kIPMReporterRecMask = 1 << kIPMReporterRecBit,
- kIPMBCCRecMask = 1 << kIPMBCCRecBit
- };
-
- typedef Byte OCERecipientOffsetFlags;
- struct OCECreatorType {
- OSType msgCreator;
- OSType msgType;
- };
- typedef struct OCECreatorType OCECreatorType;
-
-
- enum {
- kIPMTypeWildCard = 'ipmw',
- kIPMFamilyUnspecified = 0,
- kIPMFamilyWildCard = 0x3F3F3F3F, /* '????' * well known signature */
- kIPMSignature = 'ipms', /* base type * well known message types */
- kIPMReportNotify = 'rptn', /* routing feedback * well known message block types */
- kIPMEnclosedMsgType = 'emsg', /* enclosed (nested) message */
- kIPMReportInfo = 'rpti', /* recipient information */
- kIPMDigitalSignature = 'dsig' /* digital signature */
- };
-
- /* Values of IPMMsgFormat */
-
- enum {
- kIPMOSFormatType = 1,
- kIPMStringFormatType = 2
- };
-
- typedef unsigned short IPMMsgFormat;
- typedef Str32 IPMStringMsgType;
- union TheType {
- OCECreatorType msgOSType;
- IPMStringMsgType msgStrType;
- };
- typedef union TheType TheType;
-
- struct IPMMsgType {
- IPMMsgFormat format; /* IPMMsgFormat*/
- TheType theType;
- };
- typedef struct IPMMsgType IPMMsgType;
-
- /*
- Following are the known extension values for IPM addresses handled by Apple.
- We define the definition of the entn extension below.
- */
-
- enum {
- kOCEalanXtn = 'alan',
- kOCEentnXtn = 'entn', /* entn = entity name (aka DSSpec) */
- kOCEaphnXtn = 'aphn'
- };
-
- /*
- Following are the specific definitions for the extension for the standard
- OCEMail 'entn' addresses. [Note, the actual extension is formatted as in
- IPMEntityNameExtension.]
- */
- /* entn extension forms */
-
- enum {
- kOCEAddrXtn = 'addr',
- kOCEQnamXtn = 'qnam',
- kOCEAttrXtn = 'attr', /* an attribute specification */
- kOCESpAtXtn = 'spat' /* specific attribute */
- };
-
- /*
- Following are the specific definitions for standard
- OCEMail 'aphn' extension value.
-
- All RStrings here are packed (e.g. truncated to length) and even padded (e.g.
- if length odd, then a pad byte (zero) should be introduced before the next field).
-
- The extension value is in the packed form of the following structure:
- RString phoneNumber;
- RString modemType;
- Str32 queueuName;
-
- The body of phoneNumber compound RString is in the packed form of the following structure:
- short subType;
- RString countryCode; // used when subType == kOCEUseHandyDial
- RString areaCode; // used when subType == kOCEUseHandyDial
- RString phone; // used when subType == kOCEUseHandyDial
- RString postFix; // used when subType == kOCEUseHandyDial
- RString nonHandyDialString; // used when subType == kOCEDontUseHandyDial
- */
- /* phoneNumber sub type constants */
-
- enum {
- kOCEUseHandyDial = 1,
- kOCEDontUseHandyDial = 2
- };
-
- /* FORMAT OF A PACKED FORM RECIPIENT */
- struct ProtoOCEPackedRecipient {
- unsigned short dataLength;
- };
- typedef struct ProtoOCEPackedRecipient ProtoOCEPackedRecipient;
-
-
- enum {
- kOCEPackedRecipientMaxBytes = (4096 - sizeof(ProtoOCEPackedRecipient))
- };
-
- struct OCEPackedRecipient {
- unsigned short dataLength;
- Byte data[4094];
- };
- typedef struct OCEPackedRecipient OCEPackedRecipient;
-
- struct IPMEntnQueueExtension {
- Str32 queueName;
- };
- typedef struct IPMEntnQueueExtension IPMEntnQueueExtension;
-
- /* kOCEAttrXtn */
- struct IPMEntnAttributeExtension {
- AttributeType attributeName;
- };
- typedef struct IPMEntnAttributeExtension IPMEntnAttributeExtension;
-
- /* kOCESpAtXtn */
- struct IPMEntnSpecificAttributeExtension {
- AttributeCreationID attributeCreationID;
- AttributeType attributeName;
- };
- typedef struct IPMEntnSpecificAttributeExtension IPMEntnSpecificAttributeExtension;
-
- /* All IPM entn extensions fit within the following */
- struct IPMEntityNameExtension {
- OSType subExtensionType;
- union {
- IPMEntnSpecificAttributeExtension specificAttribute;
- IPMEntnAttributeExtension attribute;
- IPMEntnQueueExtension queue;
- } u;
- };
- typedef struct IPMEntityNameExtension IPMEntityNameExtension;
-
- /* addresses with kIPMNBPXtn should specify this nbp type */
- #define kIPMWSReceiverNBPType "\pMsgReceiver"
- struct IPMMsgID {
- unsigned long id[4];
- };
- typedef struct IPMMsgID IPMMsgID;
-
- /* Values of IPMHeaderSelector */
-
- enum {
- kIPMTOC = 0,
- kIPMSender = 1,
- kIPMProcessHint = 2,
- kIPMMessageTitle = 3,
- kIPMMessageType = 4,
- kIPMFixedInfo = 7
- };
-
- typedef Byte IPMHeaderSelector;
- union TheSender {
- RString rString;
- PackedRecordID rid;
- };
- typedef union TheSender TheSender;
-
- struct IPMSender {
- IPMSenderTag sendTag;
- TheSender theSender;
- };
- typedef struct IPMSender IPMSender;
-
- /******************************************************************************/
- /* Definitions specific to OCEMessaging */
- typedef unsigned long IPMContextRef;
- typedef unsigned long IPMQueueRef;
- typedef unsigned long IPMMsgRef;
- typedef unsigned long IPMSeqNum;
- typedef Str32 IPMProcHint;
- typedef Str32 IPMQueueName;
- typedef pascal void (*IPMNoteProcPtr)(IPMQueueRef queue, IPMSeqNum seqNum, IPMNotificationType notificationType, unsigned long userData);
-
- #if GENERATINGCFM
- typedef UniversalProcPtr IPMNoteUPP;
- #else
- typedef IPMNoteProcPtr IPMNoteUPP;
- #endif
-
- enum {
- uppIPMNoteProcInfo = kPascalStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(IPMQueueRef)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(IPMSeqNum)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(IPMNotificationType)))
- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(unsigned long)))
- };
-
- #if GENERATINGCFM
- #define NewIPMNoteProc(userRoutine) \
- (IPMNoteUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppIPMNoteProcInfo, GetCurrentArchitecture())
- #else
- #define NewIPMNoteProc(userRoutine) \
- ((IPMNoteUPP) (userRoutine))
- #endif
-
- #if GENERATINGCFM
- #define CallIPMNoteProc(userRoutine, queue, seqNum, notificationType, userData) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppIPMNoteProcInfo, (queue), (seqNum), (notificationType), (userData))
- #else
- #define CallIPMNoteProc(userRoutine, queue, seqNum, notificationType, userData) \
- (*(userRoutine))((queue), (seqNum), (notificationType), (userData))
- #endif
- struct IPMFixedHdrInfo {
- unsigned short version;
- Boolean authenticated;
- Boolean signatureEnclosed; /* digital signature enclosed */
- unsigned long msgSize;
- IPMNotificationType notification;
- IPMPriority priority;
- unsigned short blockCount;
- unsigned short originalRcptCount; /* original number of recipients */
- unsigned long refCon; /* Client defined data */
- unsigned short reserved;
- UTCTime creationTime; /* Time when it was created */
- IPMMsgID msgID;
- OSType family; /* family this msg belongs (e.g. mail) */
- };
- typedef struct IPMFixedHdrInfo IPMFixedHdrInfo;
-
-
- enum {
- kIPMDeliveryNotificationBit = 0,
- kIPMNonDeliveryNotificationBit = 1,
- kIPMEncloseOriginalBit = 2,
- kIPMSummaryReportBit = 3, /* modify enclose original to only on error */
- kIPMOriginalOnlyOnErrorBit = 4
- };
-
-
- enum {
- kIPMNoNotificationMask = 0x00,
- kIPMDeliveryNotificationMask = 1 << kIPMDeliveryNotificationBit,
- kIPMNonDeliveryNotificationMask = 1 << kIPMNonDeliveryNotificationBit,
- kIPMDontEncloseOriginalMask = 0x00,
- kIPMEncloseOriginalMask = 1 << kIPMEncloseOriginalBit,
- kIPMImmediateReportMask = 0x00,
- kIPMSummaryReportMask = 1 << kIPMSummaryReportBit,
- kIPMOriginalOnlyOnErrorMask = 1 << kIPMOriginalOnlyOnErrorBit,
- kIPMEncloseOriginalOnErrorMask = (kIPMOriginalOnlyOnErrorMask | kIPMEncloseOriginalMask)
- };
-
- /* standard Non delivery codes */
-
- enum {
- kIPMNoSuchRecipient = 0x0001,
- kIPMRecipientMalformed = 0x0002,
- kIPMRecipientAmbiguous = 0x0003,
- kIPMRecipientAccessDenied = 0x0004,
- kIPMGroupExpansionProblem = 0x0005,
- kIPMMsgUnreadable = 0x0006,
- kIPMMsgExpired = 0x0007,
- kIPMMsgNoTranslatableContent = 0x0008,
- kIPMRecipientReqStdCont = 0x0009,
- kIPMRecipientReqSnapShot = 0x000A,
- kIPMNoTransferDiskFull = 0x000B,
- kIPMNoTransferMsgRejectedbyDest = 0x000C,
- kIPMNoTransferMsgTooLarge = 0x000D
- };
-
- /*************************************************************************/
- /*
- This is the structure that will be returned by enumerate and getmsginfo
- This definition is just to give you a template, the position of msgType
- is variable since this is a packed structure. procHint and msgType are
- packed and even length padded.
-
- * master message info
- */
- struct IPMMsgInfo {
- IPMSeqNum sequenceNum;
- unsigned long userData;
- unsigned short respIndex;
- SInt8 padByte;
- IPMPriority priority;
- unsigned long msgSize;
- unsigned short originalRcptCount;
- unsigned short reserved;
- UTCTime creationTime;
- IPMMsgID msgID;
- OSType family; /* family this msg belongs (e.g. mail) */
- IPMProcHint procHint;
- SInt8 filler2;
- IPMMsgType msgType;
- };
- typedef struct IPMMsgInfo IPMMsgInfo;
-
- typedef OCECreatorType IPMBlockType;
- struct IPMTOC {
- IPMBlockType blockType;
- long blockOffset;
- unsigned long blockSize;
- unsigned long blockRefCon;
- };
- typedef struct IPMTOC IPMTOC;
-
- /*
- The following structure is just to describe the layout of the SingleFilter.
- Each field should be packed and word aligned when passed to the IPM ToolBox.
- */
- struct IPMSingleFilter {
- IPMPriority priority;
- SInt8 padByte;
- OSType family; /* family this msg belongs (e.g. mail), '????' for all */
- ScriptCode script; /* Language Identifier */
- IPMProcHint hint;
- SInt8 filler2;
- IPMMsgType msgType;
- };
- typedef struct IPMSingleFilter IPMSingleFilter;
-
- struct IPMFilter {
- unsigned short count;
- IPMSingleFilter sFilters[1];
- };
- typedef struct IPMFilter IPMFilter;
-
- /*
- ************************************************************************
- Following structures define the “start” of a recipient report block and the
- elements of the array respectively.
- */
- struct IPMReportBlockHeader {
- IPMMsgID msgID; /* message id of the original */
- UTCTime creationTime; /* creation time of the report */
- };
- typedef struct IPMReportBlockHeader IPMReportBlockHeader;
-
- struct OCERecipientReport {
- unsigned short rcptIndex; /* index of recipient in original message */
- OSErr result; /* result of sending letter to this recipient*/
- };
- typedef struct OCERecipientReport OCERecipientReport;
-
- /*************************************************************************/
- typedef union IPMParamBlock IPMParamBlock;
- typedef IPMParamBlock *IPMParamBlockPtr;
- /*
- This ProcPtr uses register based parameters on the 68k and cannot
- be written in or called from a high-level language without the help of
- mixed mode or assembly glue.
-
- typedef pascal void (*IPMIOCompletionProcPtr)(IPMParamBlockPtr paramBlock);
-
- */
-
- #if GENERATINGCFM
- typedef UniversalProcPtr IPMIOCompletionUPP;
- #else
- typedef Register68kProcPtr IPMIOCompletionUPP;
- #endif
- struct IPMOpenContextPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMContextRef contextRef; /* <-- Context reference to be used in further calls*/
- };
- typedef struct IPMOpenContextPB IPMOpenContextPB;
-
- typedef IPMOpenContextPB IPMCloseContextPB;
- struct IPMCreateQueuePB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- long filler1;
- OCERecipient * queue;
- AuthIdentity identity; /* used only if queue is remote */
- PackedRecordID * owner; /* used only if queue is remote */
- };
- typedef struct IPMCreateQueuePB IPMCreateQueuePB;
-
- /* For createqueue and deletequeue only queue and identity are used */
- typedef IPMCreateQueuePB IPMDeleteQueuePB;
- struct IPMOpenQueuePB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMContextRef contextRef;
- OCERecipient * queue;
- AuthIdentity identity;
- IPMFilter * filter;
- IPMQueueRef newQueueRef;
- IPMNoteUPP notificationProc;
- unsigned long userData;
- IPMNotificationType noteType;
- Byte padByte;
- long reserved;
- long reserved2;
- };
- typedef struct IPMOpenQueuePB IPMOpenQueuePB;
-
- struct IPMCloseQueuePB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMQueueRef queueRef;
- };
- typedef struct IPMCloseQueuePB IPMCloseQueuePB;
-
- struct IPMEnumerateQueuePB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMQueueRef queueRef;
- IPMSeqNum startSeqNum;
- Boolean getProcHint;
- Boolean getMsgType;
- short filler;
- IPMFilter * filter;
- unsigned short numToGet;
- unsigned short numGotten;
- unsigned long enumCount;
- void * enumBuffer; /* will be packed array of IPMMsgInfo */
- unsigned long actEnumCount;
- };
- typedef struct IPMEnumerateQueuePB IPMEnumerateQueuePB;
-
- typedef IPMEnumerateQueuePB IPMChangeQueueFilterPB;
- struct IPMDeleteMsgRangePB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMQueueRef queueRef;
- IPMSeqNum startSeqNum;
- IPMSeqNum endSeqNum;
- IPMSeqNum lastSeqNum;
- };
- typedef struct IPMDeleteMsgRangePB IPMDeleteMsgRangePB;
-
- struct IPMOpenMsgPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMQueueRef queueRef;
- IPMSeqNum sequenceNum;
- IPMMsgRef newMsgRef;
- IPMSeqNum actualSeqNum;
- Boolean exactMatch;
- Byte padByte;
- long reserved;
- };
- typedef struct IPMOpenMsgPB IPMOpenMsgPB;
-
- struct IPMOpenHFSMsgPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- FSSpec * hfsPath;
- long filler;
- IPMMsgRef newMsgRef;
- long filler2;
- Byte filler3;
- Boolean filler4;
- long reserved;
- };
- typedef struct IPMOpenHFSMsgPB IPMOpenHFSMsgPB;
-
- struct IPMOpenBlockAsMsgPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- unsigned long filler;
- IPMMsgRef newMsgRef;
- unsigned short filler2[7];
- unsigned short blockIndex;
- };
- typedef struct IPMOpenBlockAsMsgPB IPMOpenBlockAsMsgPB;
-
- struct IPMCloseMsgPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- Boolean deleteMsg;
- Boolean filler1;
- };
- typedef struct IPMCloseMsgPB IPMCloseMsgPB;
-
- struct IPMGetMsgInfoPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- IPMMsgInfo * info;
- };
- typedef struct IPMGetMsgInfoPB IPMGetMsgInfoPB;
-
- struct IPMReadHeaderPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- unsigned short fieldSelector;
- long offset;
- unsigned long count;
- void * buffer;
- unsigned long actualCount;
- unsigned short filler;
- unsigned long remaining;
- };
- typedef struct IPMReadHeaderPB IPMReadHeaderPB;
-
- struct IPMReadRecipientPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- unsigned short rcptIndex;
- long offset;
- unsigned long count;
- void * buffer;
- unsigned long actualCount;
- short reserved; /* must be zero */
- unsigned long remaining;
- unsigned short originalIndex;
- OCERecipientOffsetFlags recipientOffsetFlags;
- Boolean filler1;
- };
- typedef struct IPMReadRecipientPB IPMReadRecipientPB;
-
- /*
- replyQueue works like recipient. [can no longer read it via ReadHeader]
- OriginalIndex is meaningless, rcptFlags are used seperately and there are
- currently none defined.
- */
- typedef IPMReadRecipientPB IPMReadReplyQueuePB;
- struct IPMGetBlkIndexPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- IPMBlockType blockType;
- unsigned short index;
- unsigned short startingFrom;
- IPMBlockType actualBlockType;
- unsigned short actualBlockIndex;
- };
- typedef struct IPMGetBlkIndexPB IPMGetBlkIndexPB;
-
- struct IPMReadMsgPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- IPMAccessMode mode;
- long offset;
- unsigned long count;
- void * buffer;
- unsigned long actualCount;
- unsigned short blockIndex;
- unsigned long remaining;
- };
- typedef struct IPMReadMsgPB IPMReadMsgPB;
-
- struct IPMVerifySignaturePB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- SIGContextPtr signatureContext;
- };
- typedef struct IPMVerifySignaturePB IPMVerifySignaturePB;
-
- struct IPMNewMsgPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- unsigned long filler;
- OCERecipient * recipient;
- OCERecipient * replyQueue;
- StringPtr procHint;
- unsigned short filler2;
- IPMMsgType * msgType;
- unsigned long refCon;
- IPMMsgRef newMsgRef;
- unsigned short filler3;
- long filler4;
- AuthIdentity identity;
- IPMSender * sender;
- unsigned long internalUse;
- unsigned long internalUse2;
- };
- typedef struct IPMNewMsgPB IPMNewMsgPB;
-
- struct IPMNewHFSMsgPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- FSSpec * hfsPath;
- OCERecipient * recipient;
- OCERecipient * replyQueue;
- StringPtr procHint;
- unsigned short filler2;
- IPMMsgType * msgType;
- unsigned long refCon;
- IPMMsgRef newMsgRef;
- unsigned short filler3;
- long filler4;
- AuthIdentity identity;
- IPMSender * sender;
- unsigned long internalUse;
- unsigned long internalUse2;
- };
- typedef struct IPMNewHFSMsgPB IPMNewHFSMsgPB;
-
- struct IPMNestMsgPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- unsigned short filler[9];
- unsigned long refCon;
- IPMMsgRef msgToNest;
- unsigned short filler2;
- long startingOffset;
- };
- typedef struct IPMNestMsgPB IPMNestMsgPB;
-
- struct IPMNewNestedMsgBlockPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- OCERecipient * recipient;
- OCERecipient * replyQueue;
- StringPtr procHint;
- unsigned short filler1;
- IPMMsgType * msgType;
- unsigned long refCon;
- IPMMsgRef newMsgRef;
- unsigned short filler2;
- long startingOffset;
- AuthIdentity identity;
- IPMSender * sender;
- unsigned long internalUse;
- unsigned long internalUse2;
- };
- typedef struct IPMNewNestedMsgBlockPB IPMNewNestedMsgBlockPB;
-
- struct IPMEndMsgPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- IPMMsgID msgID;
- RString * msgTitle;
- IPMNotificationType deliveryNotification;
- IPMPriority priority;
- Boolean cancel;
- Byte padByte;
- long reserved;
- SIGSignaturePtr signature;
- Size signatureSize;
- SIGContextPtr signatureContext;
- /* family this msg belongs (e.g. mail) use kIPMFamilyUnspecified by default */
- OSType family;
- };
- typedef struct IPMEndMsgPB IPMEndMsgPB;
-
- struct IPMAddRecipientPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- OCERecipient * recipient;
- long reserved;
- };
- typedef struct IPMAddRecipientPB IPMAddRecipientPB;
-
- struct IPMAddReplyQueuePB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- long filler;
- OCERecipient * replyQueue;
- };
- typedef struct IPMAddReplyQueuePB IPMAddReplyQueuePB;
-
- struct IPMNewBlockPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- IPMBlockType blockType;
- unsigned short filler[5];
- unsigned long refCon;
- unsigned short filler2[3];
- long startingOffset;
- };
- typedef struct IPMNewBlockPB IPMNewBlockPB;
-
- struct IPMWriteMsgPB {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- IPMMsgRef msgRef;
- IPMAccessMode mode;
- long offset;
- unsigned long count;
- void * buffer;
- unsigned long actualCount;
- Boolean currentBlock;
- Boolean filler1;
- };
- typedef struct IPMWriteMsgPB IPMWriteMsgPB;
-
- union IPMParamBlock {
- struct {
- void * qLink;
- long reservedH1;
- long reservedH2;
- IPMIOCompletionUPP ioCompletion;
- OSErr ioResult;
- long saveA5;
- short reqCode;
- } header;
- IPMOpenContextPB openContextPB;
- IPMCloseContextPB closeContextPB;
- IPMCreateQueuePB createQueuePB;
- IPMDeleteQueuePB deleteQueuePB;
- IPMOpenQueuePB openQueuePB;
- IPMCloseQueuePB closeQueuePB;
- IPMEnumerateQueuePB enumerateQueuePB;
- IPMChangeQueueFilterPB changeQueueFilterPB;
- IPMDeleteMsgRangePB deleteMsgRangePB;
- IPMOpenMsgPB openMsgPB;
- IPMOpenHFSMsgPB openHFSMsgPB;
- IPMOpenBlockAsMsgPB openBlockAsMsgPB;
- IPMCloseMsgPB closeMsgPB;
- IPMGetMsgInfoPB getMsgInfoPB;
- IPMReadHeaderPB readHeaderPB;
- IPMReadRecipientPB readRecipientPB;
- IPMReadReplyQueuePB readReplyQueuePB;
- IPMGetBlkIndexPB getBlkIndexPB;
- IPMReadMsgPB readMsgPB;
- IPMVerifySignaturePB verifySignaturePB;
- IPMNewMsgPB newMsgPB;
- IPMNewHFSMsgPB newHFSMsgPB;
- IPMNestMsgPB nestMsgPB;
- IPMNewNestedMsgBlockPB newNestedMsgBlockPB;
- IPMEndMsgPB endMsgPB;
- IPMAddRecipientPB addRecipientPB;
- IPMAddReplyQueuePB addReplyQueuePB;
- IPMNewBlockPB newBlockPB;
- IPMWriteMsgPB writeMsgPB;
- };
-
-
- enum {
- uppIPMIOCompletionProcInfo = kRegisterBased
- | REGISTER_ROUTINE_PARAMETER(1, kRegisterA0, SIZE_CODE(sizeof(IPMParamBlockPtr)))
- };
-
- #if GENERATINGCFM
- #define CallIPMIOCompletionProc(userRoutine, paramBlock) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppIPMIOCompletionProcInfo, (paramBlock))
- #else
- /* (*IPMIOCompletionUPP) cannot be called from a high-level language without the Mixed Mode Manager */
- #endif
-
- #if GENERATINGCFM
- #define NewIPMIOCompletionProc(userRoutine) \
- (IPMIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppIPMIOCompletionProcInfo, GetCurrentArchitecture())
- #else
- #define NewIPMIOCompletionProc(userRoutine) \
- ((IPMIOCompletionUPP) (userRoutine))
- #endif
- extern pascal OSErr IPMOpenContext(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0400, 0xAA5E);
-
- extern pascal OSErr IPMCloseContext(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0401, 0xAA5E);
-
- extern pascal OSErr IPMNewMsg(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0402, 0xAA5E);
-
- extern pascal OSErr IPMNewBlock(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0404, 0xAA5E);
-
- extern pascal OSErr IPMNewNestedMsgBlock(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0405, 0xAA5E);
-
- extern pascal OSErr IPMNestMsg(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0406, 0xAA5E);
-
- extern pascal OSErr IPMWriteMsg(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0407, 0xAA5E);
-
- extern pascal OSErr IPMEndMsg(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0408, 0xAA5E);
-
- extern pascal OSErr IPMOpenQueue(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0409, 0xAA5E);
-
- extern pascal OSErr IPMCloseQueue(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x040A, 0xAA5E);
-
- /* Always synchronous */
- extern pascal OSErr IPMVerifySignature(IPMParamBlockPtr paramBlock)
- FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0422, 0xAA5E);
-
- extern pascal OSErr IPMOpenMsg(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x040B, 0xAA5E);
-
- extern pascal OSErr IPMCloseMsg(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x040C, 0xAA5E);
-
- extern pascal OSErr IPMReadMsg(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x040D, 0xAA5E);
-
- extern pascal OSErr IPMReadHeader(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x040E, 0xAA5E);
-
- extern pascal OSErr IPMOpenBlockAsMsg(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x040F, 0xAA5E);
-
- extern pascal OSErr IPMNewHFSMsg(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x041E, 0xAA5E);
-
- extern pascal OSErr IPMReadRecipient(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0410, 0xAA5E);
-
- extern pascal OSErr IPMReadReplyQueue(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0421, 0xAA5E);
-
- extern pascal OSErr IPMCreateQueue(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0411, 0xAA5E);
-
- extern pascal OSErr IPMDeleteQueue(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0412, 0xAA5E);
-
- extern pascal OSErr IPMEnumerateQueue(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0413, 0xAA5E);
-
- extern pascal OSErr IPMChangeQueueFilter(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0414, 0xAA5E);
-
- extern pascal OSErr IPMDeleteMsgRange(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0415, 0xAA5E);
-
- extern pascal OSErr IPMAddRecipient(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0403, 0xAA5E);
-
- extern pascal OSErr IPMAddReplyQueue(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x041D, 0xAA5E);
-
- extern pascal OSErr IPMOpenHFSMsg(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0417, 0xAA5E);
-
- extern pascal OSErr IPMGetBlkIndex(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0418, 0xAA5E);
-
- extern pascal OSErr IPMGetMsgInfo(IPMParamBlockPtr paramBlock, Boolean async)
- THREEWORDINLINE(0x3F3C, 0x0419, 0xAA5E);
-
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __OCEMESSAGING__ */
-
-